import requests
import uuid


def get_captcha():
    code = requests.get('https://etax.shandong.chinatax.gov.cn/enterprise/dzswjlogin/dl_yzm_image.jsp')
    uid = str(uuid.uuid4())
    captcha = ''.join(uid.split('-'))
    with open('sample/origin/abcd_' + captcha + '.jpg', 'wb') as file:
        file.write(code.content)
        file.close()


if __name__ == '__main__':
    for i in range(1, 1000):
        get_captcha()